<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
		/* 	.box1{
				width: 100px;
				height: 100px;
				background-color: red;
				position: fixed;
				right: 0;
				bottom: 0;
			}
			.box2{
				width: 2000px;
				height: 100px;
				background-color: green;
			}
			.box3{
				width: 100px;
				height: 2000px;
				background-color: blue;
			} */
			
			
			.box1{
				width: 300px;
				height: 300px;
				background-color: red;
				border: 10px solid #000;
				padding: 30px;
				position: relative;
			}
			.box2{
				width: 100px;
				height: 100px;
				background-color: green;
				position: absolute;
				left: 0;
				top: 0;
		 
			}
			
		</style>
	</head>
	<body>
		
		
		<!-- 
		 1.如果一个绝对定位的元素是以body作为参考点
		 那么其实是以网页的首屏的宽度和高度作为参考点
		 不是以整个网页的高度和宽度作为参考点
		 
		 2.一个绝对定位的元素会忽略父元素的padding
		 -->
		
	<!-- 	<div class="box1"></div>
		<div class="box2"></div>
		<div class="box3"></div> -->
		
		
		<div class="box1">
			<div class="box2"></div>
		</div>
		
	</body>
</html>